package me.jollyfly.jshop.item.server.dao;


import me.jollyfly.jshop.item.client.model.ItemCategoryDO;
import me.jollyfly.jshop.item.client.model.bo.RecommendationBO;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

/**
 * @author jollyfly
 */
@Repository
public interface ItemCatDAO extends Mapper<ItemCategoryDO>, MySqlMapper<ItemCategoryDO> {
    /**
     * 根据父类目ID查询所有子类目
     *
     * @param parnetId 父类目ID
     *
     * @return
     */
    List<ItemCategoryDO> listCategoryByParent(Long parnetId);

    /**
     * 查询所有推荐商品
     * @return
     */
    List<RecommendationBO> listAllRecommendation();
}
